Add a -l option to vtesto to run memory leak mode so I don't have to remember
authorrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Wed, 31 Jul 2013 17:06:46 +0000 (17:06 +0000)
committerrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Wed, 31 Jul 2013 17:06:46 +0000 (17:06 +0000)
the valgrind syntax each time.

git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@4490 f51c46e8-681c-474f-0cfe-069cfd0219fb

gpsbabel/vtesto

index ad35d91d38f2b08d3d63df49f0d8621efa341027..528b131063be31f419ec2c0845ac2eb5c20b9294 100755 (executable)
@@ -6,5 +6,14 @@
 # from time to time.
 #
 
+QUIET="-q"
 BASEPATH=`dirname $0`
-PNAME="valgrind --error-exitcode=1 -q ./gpsbabel" ${BASEPATH}/testo $*
+
+while getopts "l" opt; do
+  case $opt in
+    l) OPTS="--leak-check=full --show-reachable=yes" ; QUIET="";;
+  esac
+done
+shift $(($OPTIND -1))
+
+PNAME="valgrind $OPTS --error-exitcode=1 $QUIET ./gpsbabel" ${BASEPATH}/testo $*